
import 'package:device_info_plus/device_info_plus.dart';
import 'package:package_info_plus/package_info_plus.dart';
class MSConfigInfoUtil{
  static final MSConfigInfoUtil _instance = MSConfigInfoUtil._();
  MSConfigInfoUtil._();

  factory MSConfigInfoUtil(){
    return _instance;
  }
  String model = "";
  String deviceId = "";
  String package = "";
  String version = "";
  String buildNumber = "";
   getDeviceInfo()async{
    DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
    IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
    model = iosInfo.model;
    deviceId = iosInfo.data["identifierForVendor"];
  }

  getPackageInfo()async{
    PackageInfo packageInfo = await PackageInfo.fromPlatform();
    package = packageInfo.packageName;
    version = packageInfo.version;
    buildNumber = packageInfo.buildNumber;
  }

  init()async {
     await getDeviceInfo();
     await getPackageInfo();
  }
}